<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<!-- 必须引入 -->
<link th:href="@{/ui/css/plugins/datetimepicker/bootstrap-datetimepicker.css}"  rel="stylesheet" />
<script th:src="@{/ui/js/plugins/datetimepicker/bootstrap-datepicker.js}"></script>
<script type="text/javascript">

//初始化时间元素对象；
$('#enddaydiv .date').datepicker({
	format : 'yyyy-mm-dd'
	}).on("changeDate", function(e){
		var date = $(this).datepicker('getDate');
	   var d = date.Format("yyyy-MM-dd");
});
//动态设置时间元素对象 的值
 var  endtime=[[${endtime}]];
		    if(endtime!=undefined&&endtime!=null&&endtime!="")
			$('#enddaydiv .date').datepicker( 'setDate' , endtime);
//获取时间元素input 的值

var endday=$("#endday").val();

			

</script>
</head>
<body>

               <label class="col-md-2 control-label"    style="width:100px;display:block;line-height:23px;padding-top:0px;padding-right:3px;"><b
							style="color: #f00;" >*</b>失效时间：</label>
						<div id="startdaydiv" class="col-md-2 inline ">
							<div class="input-group date ">
								<input id="end_day" name="end_day" type="text"
									readonly="readonly" class="form-control input-sm"
									style="background: white; cursor: default;width:90px;" placeholder="开始日期" />
								<span class="input-group-addon"><i
									class="glyphicon glyphicon-th"></i></span>
							</div>
						</div>

</body>
</html>